package cn.bigway.app.weavingdesigner.main;

import javax.swing.JToolBar;

import cn.bigway.app.weavingdesigner.action.WdActionFactory;
import cn.bigway.app.weavingdesigner.conf.WdConf;
import cn.bigway.app.weavingdesigner.type.WdMenuItemType;

final class WdToolBar extends JToolBar {

	private static final long serialVersionUID = 7318034256692605239L;

	private static final WdToolBar toolBar;

	private WdToolBar() {
		//
	}

	public static WdToolBar getInstance() {
		return toolBar;
	}

	static {
		toolBar = new WdToolBar();

		for (WdMenuItemType type : WdConf.visibleToolBarItems) {
			toolBar.add(WdActionFactory.getInstance().createButton(type));
		}
	}
}